#!/usr/bin/env python
#
#   Copyright (C) 2006 Jonathan Saggau                                    
#   saggau@gmail.com                                                      
#                                                                         
#   This program is free software; you can redistribute it and/or modify  
#   it under the terms of the GNU General Public License as published by  
#   the Free Software Foundation; either version 2 of the License, or     
#   (at your option) any later version.                                   
#                                                                         
#   This program is distributed in the hope that it will be useful,       
#   but WITHOUT ANY WARRANTY; without even the implied warranty of        
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         
#   GNU General Public License for more details.                          
#                                                                         
#   You should have received a copy of the GNU General Public License     
#   along with this program; if not, write to the                         
#   Free Software Foundation, Inc.,                                       
#   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.  
#
import msg

# add actions:
#0 - add the new node to the the head of the group 
#    specified by the add target ID.
#1 - add the new node to the the tail of the group
#    specified by the add target ID.
#2 - add the new node just before the node
#    specified by the add target ID.
#3 - add the new node just after the node
#    specified by the add target ID.
#4 - the new node replaces the node specified by the add target ID.

#Actions
HEAD = 0
TAIL = 1
BEFORE = 2
AFTER = 3
REPLACE = 4

#Synth Commands

def new(name, nodeid, action, target, indexValueDict={}):
    return msg.dictmsg(["/s_new", name, nodeid, action, target],
                        indexValueDict)
    
def get(*synths):
    return msg.msg('/s_get', synths)
    
def getn(id, indexNumberOfControlsDict):
    return msg.dictmsg('/s_getn', id, indexNumberOfControlsDict)
    
def noid(*synths):
    return msg.msg('/s_noid', synths)

def test():
    pass

if __name__ == "__main__":
    test()
